package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ActivityMapper;
import com.ruoyi.system.domain.Activity;
import com.ruoyi.system.service.IActivityService;
import com.ruoyi.common.core.text.Convert;

/**
 * 活动展示Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-01-18
 */
@Service
public class ActivityServiceImpl implements IActivityService 
{
    @Autowired
    private ActivityMapper activityMapper;

    /**
     * 查询活动展示
     * 
     * @param actId 活动展示主键
     * @return 活动展示
     */
    @Override
    public Activity selectActivityByActId(Long actId)
    {
        return activityMapper.selectActivityByActId(actId);
    }

    /**
     * 查询活动展示列表
     * 
     * @param activity 活动展示
     * @return 活动展示
     */
    @Override
    public List<Activity> selectActivityList(Activity activity)
    {
        return activityMapper.selectActivityList(activity);
    }

    /**
     * 新增活动展示
     * 
     * @param activity 活动展示
     * @return 结果
     */
    @Override
    public int insertActivity(Activity activity)
    {
        return activityMapper.insertActivity(activity);
    }

    /**
     * 修改活动展示
     * 
     * @param activity 活动展示
     * @return 结果
     */
    @Override
    public int updateActivity(Activity activity)
    {
        return activityMapper.updateActivity(activity);
    }

    /**
     * 批量删除活动展示
     * 
     * @param actIds 需要删除的活动展示主键
     * @return 结果
     */
    @Override
    public int deleteActivityByActIds(String actIds)
    {
        return activityMapper.deleteActivityByActIds(Convert.toStrArray(actIds));
    }

    /**
     * 删除活动展示信息
     * 
     * @param actId 活动展示主键
     * @return 结果
     */
    @Override
    public int deleteActivityByActId(Long actId)
    {
        return activityMapper.deleteActivityByActId(actId);
    }
}
